﻿@using VirtualPress.Infrastructure.Entities.Entity;
@using VirtualPress.Tool.Framework;
@using VirtualPress.Infrastructure.Entities.Enum;
@{
    ViewBag.Title = "作者中心";
    Layout = "/Areas/WorkSpace/Views/Shared/_WorkSpace.cshtml";
}
<div id="content-header">
    <h1>
        作者中心</h1>
</div>
<div id="breadcrumb">
    <a href="javascript:" class="tip-bottom"><i class="icon-home"></i>起始页</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="alert alert-info">
            欢迎使用中华科教出版社学术稿件采编平台作者中心！<a href="javascript:" data-dismiss="alert" class="close"
                title="关闭"><i class="icon-remove"></i></a>
        </div>
        <div class="span12 center" style="text-align: center;">
            <ul class="stat-boxes">
                <li>
                    <div class="right">
                        <strong><a href="/workspace/member/bill">@ViewBag.PayMentItemCount</a></strong> 系统通知
                    </div>
                </li>
                <li>
                    <div class="right">
                        <strong><a href="/WorkSpace/Member/Article?type=-1">@ViewBag.ArticleCount</a></strong> 所有投稿
                    </div>
                </li>
                <li>
                    <div class="right">
                        <strong><a href="/WorkSpace/Member/Article?type=20">@ViewBag.PassArticleCount</a></strong> 录用稿件
                    </div>
                </li>
                <li>
                    <div class="right">
                        <strong><a href="/WorkSpace/Member/Article?type=40">@ViewBag.PublishArticle</a></strong> 出版稿件
                    </div>
                </li>
                @*<li>
                    <div class="right">
                        <strong>94</strong> 访问次数
                    </div>
                </li>*@
            </ul>
        </div>
    </div>
    <div class="row-fluid">
        <div class="span6">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-file"></i></span>
                    <h5>
                        审核中稿件</h5>
                    <span title="我的稿件" class="label label-info tip-left">@ViewBag.ExamineArticleCount</span></div>
                <div class="widget-content nopadding">
                    <ul class="recent-posts">
                    @{
                        List<Article> exmaineArticle = ViewBag.ExamineArticle;
                        if(exmaineArticle!= null && exmaineArticle.Any())
                        {
                            foreach(var item in exmaineArticle)
                            {
                        <li>
                            <div class="article-post">
                                <p>
                                    <a href="/workspace/member/articledetail/@item.Id">@item.Title</a>
                                    <p>
                                        <span class="user-info">@item.Abstract.PieceOfString(0,100,"......")<br />
                                            -- @item.CreateTime.ToString("yyyy年 MM月 dd日 hh:mm")</span>
                                    </p>
                                </p>
                                <a href="/workspace/member/articledetail/@item.Id" class="btn btn-primary btn-mini">查看稿件</a>
                            </div>
                        </li>
                            }
                            <li class="viewall"><a title="更多审稿件" class="tip-top" href="/workspace/member/article?type=-1">+ 更多 + </a></li>
                        }
                        else
                        {
                        <li>
                            <div class="article-post">
                                <p>
                                    <a>您还没有在审稿件</a>
                                    <p>
                                        <span class="user-info">您还有没在审稿件，您可以通过<a href="/Journals/home/List" target="_blank">期刊中心</a>选择期刊并进行投稿。或通过<a href="/workspace/member/choosejournal">我要投稿</a>筛选期刊进行投稿<br />
                                           <a href="/workspace/member/choosejournal" class="btn btn-primary btn-mini">我要投稿</a></span>
                                    </p>
                                </p>
                                <div class="btn btn-mini disabled">
                                    初审中</div>
                            </div>
                        </li>
                        }
                    }
                    </ul>
                </div>
            </div>
        </div>
        <div class="span6">
            <div class="widget-box">
                <div class="widget-title">
                    <span class="icon"><i class="icon-book"></i></span>
                    <h5>
                        投稿期刊</h5>
                    <span title="关注期刊" class="label label-info tip-left">@ViewBag.MyJournalCount</span></div>
                <div class="widget-content nopadding">
                    <ul class="recent-comments">
                    @{
                        List<Favour> myjournal = ViewBag.MyJournal;
                        if (myjournal != null && myjournal.Any())
                        {
                        foreach(var item in myjournal)
                        {
                            var journal = new Periodical().Find(item.JournalId.ToString());
                            if(journal == null)
                            {
                                continue;
                            }
                        <li>
                            <div class="user-thumb" style="height: 60px; width: 50px">
                                <img style="height: 60px; width: 50px" alt="User" src="@journal.CoverImg">
                            </div>
                            <div class="comments">
                                <p>
                                    <a target="_blank" href="/journals/home/detail/@journal.Id">@journal.Name</a>
                                </p>
                                <p>
                                    <span class="user-info">@journal.Introduction.PieceOfString(0,50,"......")<br />
                                        主办：@journal.ZBDW &nbsp;&nbsp;&nbsp;投稿总计：<span class="label label-info">@item.ArticleNum</span> </span>
                                </p>
                                <a href="/WorkSpace/member/Contribute?journal=@journal.Id" class="btn btn-primary btn-mini">投稿</a> 
                            </div>
                        </li>
                        }
                        <li class="viewall"><a title="更多我的期刊" class="tip-top" href="/WorkSpace/Member/MyJournals">+ 更多 + </a></li>
                        }
                        else
                        {
                        <li>
                            <div class="article-post">
                                <p>
                                    <a>您还没有进行过投稿</a>
                                    <p>
                                        <span class="user-info">您还有进行过投稿，在您投稿过后这里将统计您投稿的期刊。现在您可以通过<a href="/Journals/home/List" target="_blank">期刊中心</a>选择期刊并进行投稿。或通过<a href="/workspace/member/choosejournal">我要投稿</a>筛选期刊进行投稿<br />
                                           <a href="/workspace/member/choosejournal" class="btn btn-primary btn-mini">我要投稿</a></span>
                                    </p>
                                </p>
                            </div>
                        </li>
                        }
                    }
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript">
        $(function () {
            $('#likmain').addClass('active');
        });
    </script>
}
